BE Code Review Process
1. Purpose
This process to ensures the code changes meet quality, maintainability, and adhere to coding standard guidelines.
2. Scope
This document outlines the code review process for the Backend Services.
3. Process Overview
3.1. Initiating a Code Review
-
Developer Submission: Developer completes the coding for bug fix or new feature development and submits the same for review process to ensure the standards are followed.
-
Notification: Reviewers get notified as soon the developer submites the code review request.
3.2. Code Review
-
Review Preparation:
- Reviewer/Lead should be familiar with the new feature developed or bug fix done buy the developer.
-
Review Checklist:
- Please refer this on how to comment on a PR
- Ensure adherence to coding standards.
- Verify the business functionality with agreed User Stories.
- Check for potential bugs, edge cases, and error handling.
- Evaluate code readability, maintainability, and performance implications.
- Verify the complex level codes are provided with inline comments for more user readability.
3.3. Review Feedback
-
Feedback Delivery:
- Please refer this on how to comment on a PR
- Reviewer provides constructive feedback, suggestions for improvements, or asks clarifying questions.
- Feedback should be specific, actionable, and respectful.
- If its a required change, you could specify that as a "Required change". If its an optional change/suggestion, shall mention it as "Question Point/Discussion"
-
Discussion:
- Developer and reviewer shall discuss the feedback comments and clarify any points as applicable and agree on the final changes.
3.4. Implementation of Feedback
- Developer Actions:
- Developer makes necessary code changes based on reviewers feedback and commit the code through PR merge.
- Verification:
- Reviewer validates that feedback comments are addressed without any further impact in business logic.
- Reviewer should resolve the comment after the changes are made.
- In case of unresolved issues, further iterations are initiated.
3.5. Approval and Merge
- Final Approval:
- Reviewer approves the code changes if the subsequent commits with incorporated feedbacks are satisfactory.
- Merge:
- Code is merged into the main branch after approval.
- Continuous integration (CI) processes will trigger the automated deployment process.
4. Responsibilities
- Developer: Submits code for review, addresses feedback promptly.
- Reviewer: Conducts thorough reviews, provides constructive feedback, ensures quality and adherence to standards.
- Team Lead (or Project Manager): Oversees the process, resolves conflicts or disagreements, ensures timely reviews.
5. Best Practices
- Regular Reviews: Conduct reviews frequently to maintain code quality and consistency.
- Feedback Culture: Foster an environment where feedback is constructive and respectful.
- Automation: Utilize automated tools for code formatting, static analysis, and testing to complement manual reviews.
- Knowledge Sharing: Use reviews as opportunities for knowledge sharing and mentoring.
6. Continuous Improvement
- Feedback Loop: Periodically review and refine the code review process based on team feedback and evolving best practices.
- Metrics: Monitor metrics such as review turnaround time, issues found post-merge, and team satisfaction to identify areas for improvement.
7. Conclusion
Effective code reviews are essential for ensuring code quality, reducing defects, and improving overall team collaboration.